<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Follow User</title>
    <style>
        body {
            font-family: Arial, sans-serif;
        }
        form {
            margin-bottom: 20px;
        }
        label, input {
            display: block;
            margin-bottom: 10px;
        }
        button {
            padding: 10px 20px;
            background-color: #28a745;
            color: white;
            border: none;
            cursor: pointer;
        }
        button:hover {
            background-color: #218838;
        }
        .information {
            margin-bottom: 20px;
            color: green;
        }
        .error {
            color: red;
        }
    </style>
</head>
<body>
<h1>关注用户</h1>
<p>请输入您要关注的用户详细ID:</p>

<!-- 添加关注功能的表单 -->
<form th:action="@{/userdetail/follow}" method="post" id="followForm">
    <label for="userDetailId">用户详细ID:</label>
    <input type="text" id="userDetailId" name="userDetailId" required>
    <button type="submit" class="btn btn-success">关注</button>
</form>

<!-- 显示结果信息的区域 -->
<div class="information" th:if="${information != null}" th:text="${information}"></div>

<!-- 返回主界面的按钮 -->
<a th:href="@{/userdetail/mainpage}" class="btn btn-primary">返回主界面</a>

</body>
</html>